@import './variables.less';

.top-nav {
  position: fixed;
  top: 0px;
  right: 0px;
  left: 0px;
  z-index: 999;
  box-shadow: rgba(0, 0, 0, 0.08) 0px 1px 4px 0px;
  background-color: rgb(255, 255, 255);
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;

  .nav-left,
  .nav-right {
    display: flex;
    align-items: center;
  }

  .nav-left {
    .the-pane-toggle {
      width: 50px;
      height: 50px;
      line-height: 50px;
      box-sizing: border-box;
      outline: medium;
      background: none @color-primary;
      cursor: pointer;
      text-decoration: none;
      transition: all 0.3s ease-out 0s;
      border: none;
      vertical-align: middle;
      text-align: center;
      color: rgb(85, 85, 85);
    }

    .logo {
      padding: 0px 12px;
      height: 50px;
      line-height: 50px;
      color: @color-primary;
      font-size: 18px;
    }
  }

  .nav-right {
    .item {
      position: relative;
      padding: 0px 12px;
      height: 50px;
      line-height: 50px;
    }
  }
}

.viewFramework {
  position: absolute;
  width: 100%;
  top: 50px;
  bottom: 0px;
  background-color: #000;
  z-index: 100;

  .viewFramework-content {
    width: auto;
    position: absolute;
    top: 0px;
    left: 0px;
    bottom: 0px;
    right: 0px;
    overflow: hidden;
    background: #ffffff;

    .viewFramework-navbar {
      width: 208px;
      float: left;
      background-color: #F5F5F5; // EAEDF1 
      position: absolute;
      top: 0px;
      bottom: 0px;
      z-index: 2;
      transition: all 0.2s ease;
      overflow: hidden;

      .product-nav-stage {
        width: 208px;
        overflow: hidden;
        position: absolute;
        top: 0px;
        bottom: 0px;
        right: 0px;

        .product-nav-scene {
          width: 208px;
          position: absolute;
          top: 0px;
          bottom: 0px;
          transition: position, .2s, linear;

          .product-nav-title {
            background: #F5F5F5;
            height: 48px;
            line-height: 48px;
            font-size: 14px;
            text-indent: 16px;
            border-bottom: 1px solid #DEDEDE;
            font-weight: 500;

            a {
              font-size: 20px;
              color: #546478;
              text-decoration: none;
            }
          }

          .product-nav-list {
            position: absolute;
            top: 48px;
            left: 0px;
            right: 0px;
            bottom: 0px;
            overflow-y: auto;
            overflow-x: hidden;

            &>ul {
              padding-bottom: 72px;
            }

            .ant-menu {
              font-size: 12px;
              color: #333;
            }

            .ant-menu-submenu-selected {
              color: #333;
              font-weight: 500;
              -webkit-font-smoothing: antialiased;
            }

            .ant-menu-submenu>.ant-menu {
              background-color: transparent;
            }

            .ant-menu-submenu-expand-icon,
            .ant-menu-submenu-arrow {
              color: #a8a8a8;
            }

            .ant-menu-submenu:hover>.ant-menu-submenu-title>.ant-menu-submenu-arrow {
              color: #a8a8a8;
            }

            .ant-menu-item-only-child {
              color: #555;
            }

            .ant-menu-submenu:hover>.ant-menu-submenu-title>.ant-menu-submenu-expand-icon {
              color: #555;
              background-color: #EBEBEB;
            }

            .ant-menu-item:hover,
            .ant-menu-item-active,
            .ant-menu:not(.ant-menu-inline) .ant-menu-submenu-open,
            .ant-menu-submenu-active,
            .ant-menu-submenu-title:hover {
              color: #555;
              background-color: #EBEBEB;
            }

            .ant-menu-submenu-active {
              color: rgb(20, 14, 14);
            }

            .ant-menu-item-selected a,
            .ant-menu-item-selected a:hover {
              color: #555;
            }

            .ant-menu-item a {
              color: #555;
            }
            .ant-menu-item a:hover {
              color: #555;
            }

            .ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
              font-weight: 700;
              // color: #333;
              background-color: #DEDEDE;

              &::after {
                opacity: 0
              }
            }

            .ant-menu-vertical .ant-menu-item:not(:last-child),
            .ant-menu-vertical-left .ant-menu-item:not(:last-child),
            .ant-menu-vertical-right .ant-menu-item:not(:last-child),
            .ant-menu-inline .ant-menu-item:not(:last-child) {
              margin-bottom: 0;
            }

            .ant-menu-vertical .ant-menu-item,
            .ant-menu-vertical-left .ant-menu-item,
            .ant-menu-vertical-right .ant-menu-item,
            .ant-menu-inline .ant-menu-item,
            .ant-menu-vertical .ant-menu-submenu-title,
            .ant-menu-vertical-left .ant-menu-submenu-title,
            .ant-menu-vertical-right .ant-menu-submenu-title,
            .ant-menu-inline .ant-menu-submenu-title {
              margin-top: 0;
              margin-bottom: 0;
            }

            ul li.nav-first-parent:before {
              content: "";
              width: 178px;
              height: 1px;
              background: #DEDEDE;
              display: table;
              margin: 8px auto;
            }
          }
        }

        .product-nav-main-scene {
          left: 0px;
        }

        .product-nav-sub-scene {
          left: 208px;

          .product-nav-title {
            text-align: center;
          }
        }

        &.stage-sub {
          .product-nav-main-scene {
            left: -208px;
          }

          .product-nav-sub-scene {
            left: 0;
          }
        }
      }
    }

    .viewFramework-collapse {
      position: absolute;
      left: 208px;
      top: 50%;
      width: 12px;
      height: 66px;
      z-index: 3;
      transition: all 0.2s ease;

      .navbar-collapse-inner {
        top: -50%;
        position: relative;
        overflow: hidden;
      }

      .navbar-collapse-bg {
        position: absolute;
        left: 0;
        top: 0;
        height: 66px;
        right: auto;
        border-bottom: 8px solid transparent;
        border-right: none;
        border-left: 12px solid #EBEBEB;
        border-top: 8px solid transparent;
        transition: all 0.12s ease;
      }

      .navbar-collapse-item {
        height: 66px;
        left: 0;
        right: auto;
        position: relative;
        text-align: center;
        transition: all 0.1s ease, 0.1s ease;
        cursor: pointer;

        &>span {
          font-size: 15px;
          line-height: 50px;
          vertical-align: text-top;
        }
      }

      .icon-collapse-left,
      .icon-collapse-right {
        position: absolute;

        &::before,
        &::after {
          position: absolute;
          content: '';
          border: 8px transparent dashed;
        }
      }

      .icon-collapse-left {
        transform: rotate(180deg);
        left: 10px;
        top: 40px;
        display: inline;

        &::before {
          border-left: 8px #C1C1C1 solid;
        }

        &::after {
          left: -2px;
          border-left: 8px #EBEBEB solid;
        }
      }

      .icon-collapse-right {
        left: 3px;
        top: 25px;
        transition: all 0.12s ease;
        display: none;

        &::before {
          border-left: 8px #C1C1C1 solid;
        }

        &::after {
          left: -2px;
          border-left: 8px #EBEBEB solid;
        }
      }

      &:hover {
        transform: scale(1.05) translateY(2px);

        .navbar-collapse-bg {
          border-left: 14px solid #DEDEDE;
        }

        .navbar-collapse-item {

          .icon-collapse-left,
          .icon-collapse-right {
            &::before {
              border-left: 8px #888 solid;
            }
          }
        }
      }
    }

    .viewFramework-body {
      position: absolute;
      width: auto;
      top: 0px;
      bottom: 0px;
      left: 208px;
      right: 0px;
      overflow: hidden;
      overflow-y: auto;
      transition: all 0.2s ease;
      // background-color: #fafafa;
    }

    &.isCollapse {
      .viewFramework-navbar {
        width: 0;
      }

      .viewFramework-collapse {
        left: 0;

        .icon-collapse-left {
          display: none;
        }

        .icon-collapse-right {
          display: inline;
        }
      }

      .viewFramework-body {
        left: 0px;
      }
    }
  }
}

.the-pane {
  line-height: 1.5;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 12px;

  .the-pane-main {
    position: relative;
    z-index: 10;
    box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 4px 0px;
    background-color: rgb(255, 255, 255);
    width: 240px;
    height: 100%;
    transition: all 0.25s ease-in-out 0s;

    .aside {
      height: 100%;
      display: flex;
      flex-direction: column;
    }
  }

  .the-pane-main-sub {
    display: block;
    flex: 1 1 0%;
    position: relative;
    z-index: 5;
    background-color: rgb(247, 247, 247);
    min-width: 490px;
    max-width: 980px;
    overflow: hidden;
    // transition: all 0.25s cubic-bezier(0, 0, 0.2, 1) 0s;
    transform: translateX(-1240px);
  }

  .the-pane-mask {
    position: absolute;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.2);
    width: 100vw;
    height: 100vh;
    transition: opacity 0.25s ease-in-out 0s;
    visibility: visible;
    opacity: 1;
  }

  &.hide {
    display: flex;
    position: fixed;
    // inset: 50px 0px 0px;
    top: 50px;
    right: 0px;
    bottom: 0px;
    left: 0px;
    z-index: 998;
    width: 0px;
    overflow: hidden;

    .the-pane-main {
      width: 0px;
    }
  }

  &.show {
    display: flex;
    position: fixed;
    // inset: 50px 0px 0px;
    top: 50px;
    right: 0px;
    bottom: 0px;
    left: 0px;
    z-index: 998;

    .the-pane-main {
      width: 240px;
    }
  }
}

.console-container {
  padding: 0 15px;
}

.main-page-v1 {
  background: #fafafa;
  width: 100%;
  min-height: 100%;
}